/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package azouz.java.refliction;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 *
 * @author azouz
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, NoSuchMethodException, InvocationTargetException {
        Class cls = Class.forName("azouz.java.refliction.RomanCalculator");
        Object obj = cls.newInstance();
        Class[] paramString = new Class[1];
        paramString[0] = String.class;
        Method method = cls.getDeclaredMethod("romanToArabic", paramString);
        System.out.println(method.invoke(obj, "MMCIV"));
    }

}
